import { FormattedMessage } from 'umi-plugin-react/locale';

export const TableColumn = {
    // api调用情况分析表格
    apicallanalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.apiName" />,
            dataIndex: 'apiName',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.businessName" />,
            dataIndex: 'apiType',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.callNum" />,
            dataIndex: 'total',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.callSucceedNum" />,
            dataIndex: 'success',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.callFailNum" />,
            dataIndex: 'failure',
            width: 'calc(10vw)',
            align: 'center',
        }
    ],
    // 对话流程分析表格
    dialogueAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogue2" />,
            dataIndex: 'sceneName',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogue3" />,
            dataIndex: 'intention',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueSampleNum" />,
            dataIndex: 'likeNum',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueState" />,
            dataIndex: 'disabled',
            width: 'calc(10vw)',
            align: 'center',
            render: text =>{
                if(text){
                    return (<span style={{color:'red'}}>关闭</span>)
                }
                return (<span style={{color:'green'}}>开启</span>)
            }
        }
    ],
    // 知识点数量分析
    knowledgeAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.knowledge1" />,
            dataIndex: 'categoryNums',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.knowledge2" />,
            dataIndex: 'knowledgeNums',
            align: 'center',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.knowledge3" />,
            dataIndex: 'newNums',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.knowledge4" />,
            dataIndex: 'updateNums',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.knowledge5" />,
            dataIndex: 'delNums',
            width: 'calc(10vw)',
            align: 'center',
        }
    ],
    // 多轮对话总体情况分析
    mulDialogueAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis2" />,
            dataIndex: 'sceneName',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis3" />,
            dataIndex: 'intention',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis4" />,
            dataIndex: 'dialogNum',
            width: 'calc(8vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis5" />,
            dataIndex: 'finished',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis6" />,
            dataIndex: 'unfinished',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis7" />,
            dataIndex: 'rate',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis8" />,
            dataIndex: 'termNum',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.mulDialogueAnalysis9" />,
            dataIndex: 'avgNum',
            width: 'calc(10vw)',
            align: 'center',
        },
    ],
    // 多轮对话完成率分析
    dialogueRateAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'nameTwo',
            align: 'left',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis2" />,
            dataIndex: 'name',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis3" />,
            dataIndex: 'dictName',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis4" />,
            dataIndex: 'isRequired',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis5" />,
            dataIndex: 'isRequired1',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis6" />,
            dataIndex: 'isRequired2',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueRateAnalysis7" />,
            dataIndex: 'isRequired2',
            width: 'calc(10vw)',
            align: 'center',
        }
    ],
    // 多轮对话平均轮数分析
    dialogueAveAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'nameTwo',
            align: 'left',
            width: 'calc(18vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueAveAnalysis2" />,
            dataIndex: 'name',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueAveAnalysis3" />,
            dataIndex: 'dictName',
            align: 'center',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueAveAnalysis4" />,
            dataIndex: 'isRequired',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueAveAnalysis5" />,
            dataIndex: 'isRequired1',
            width: 'calc(10vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueAveAnalysis6" />,
            dataIndex: 'isRequired2',
            width: 'calc(10vw)',
            align: 'center',
        }
    ],
    // 多轮对话失败原因分析
    dialogueFailAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(8vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueFailAnalysis2" />,
            dataIndex: 'sceneName',
            align: 'center',
            width: 'calc(15vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueFailAnalysis3" />,
            dataIndex: 'question',
            align: 'center',
            width: 'calc(20vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.dialogueFailAnalysis4" />,
            dataIndex: 'answer',
            width: 'calc(20vw)',
            align: 'center',
            render: text => {
                return <div dangerouslySetInnerHTML = {{ __html: text }} />
            }
        },
    ],
    // 问答任务情况分析
    questionAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(8vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.questionAnalysi2" />,
            dataIndex: 'question',
            align: 'center',
            width: 'calc(12vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.questionAnalysi3" />,
            dataIndex: 'answer',
            align: 'center',
            width: 'calc(20vw)',
            render: text => {
                return <div dangerouslySetInnerHTML = {{ __html: text }} />
            }
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.questionAnalysi4" />,
            dataIndex: 'correct',
            width: 'calc(8vw)',
            align: 'center',
            render: text =>{
                if(text){
                    return (<span>是</span>)
                }
                return (<span>否</span>)
            }
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.questionAnalysi5" />,
            dataIndex: 'error',
            width: 'calc(8vw)',
            align: 'center',
            render: text =>{
                if(text){
                    return (<span>是</span>)
                }
                return (<span>否</span>)
            }
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.questionAnalysi6" />,
            dataIndex: 'accuracy',
            width: 'calc(8vw)',
            align: 'center',
        }
    ],
    // 未知问题分析
    unKnownQuestionAnalysisColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(8vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAnalysis2" />,
            dataIndex: 'question',
            align: 'center',
            width: 'calc(12vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAnalysis3" />,
            dataIndex: 'answer',
            align: 'center',
            width: 'calc(20vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAnalysis4" />,
            dataIndex: 'valid',
            width: 'calc(8vw)',
            align: 'center',
            render: text =>{
                if(text){
                    return (<span>是</span>)
                }
                return (<span>否</span>)
            }
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAnalysis5" />,
            dataIndex: 'invalid',
            width: 'calc(8vw)',
            align: 'center',
            render: text =>{
                if(text){
                    return (<span>是</span>)
                }
                return (<span>否</span>)
            }
        }
    ],
    // 未知问题知识点聚合
    unKnownQuestionAggColumn: [
        {
            title: <FormattedMessage id="app.operateAnalysis.robotName" />,
            dataIndex: 'robotName',
            align: 'left',
            width: 'calc(10vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAgg2" />,
            dataIndex: 'question',
            align: 'center',
            width: 'calc(12vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAgg3" />,
            dataIndex: 'answer',
            align: 'center',
            width: 'calc(20vw)',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAgg4" />,
            dataIndex: 'addSimilar',
            width: 'calc(15vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAgg5" />,
            dataIndex: 'addQa',
            width: 'calc(8vw)',
            align: 'center',
        },
        {
            title: <FormattedMessage id="app.operateAnalysis.unKnownQuestionAgg6" />,
            dataIndex: 'untreated',
            width: 'calc(8vw)',
            align: 'center',
        }
    ]
}
